<template>
<ul class="giftc">
    <li v-for="(json,i) in items">
        <img :src="json.img" alt="">
        <p>{{json.item}}</p>
        <p><span>{{json.m}}</span>原价:<em>{{json.yj}}</em></p>
    </li>
</ul>
</template>
  
<script>
  export default {
    data() {
        return{
            items:[]        
        }
    },
    created:function  () {
        for (var i = 0; i < 4; i++) {
            this.items[i] = {};
            this.items[i].item = "休闲零食五味园pk脆独 立小包装500g";
            this.items[i].img = require('../assets/hy/jg'+(i+1)+'.jpg');
            this.items[i].m="￥10.9";
            this.items[i].yj="￥12.8";
        };

    }
  }
</script>

<style type="text/css">
.giftc{display: flex;flex-wrap:wrap;justify-content: space-between;}
.giftc li{width: 1.75rem;}
.giftc li img{width: 100%;}
.giftc li p{padding: 0 .08rem;font-size: .15rem;color: black;}
.giftc li p span{}
.giftc li p em{text-decoration: line-through;}
.content .giftc{padding: 0 .1rem;}
.content{padding-bottom: .62rem;}
</style>